from django.db import models
from Shikimo.pix.models import Photo


class Comment(models.Model):
    photo = models.ForeignKey(Photo)
    datetime = models.DateTimeField()
    author = models.CharField(max_length = 20)
    email = models.EmailField()
    website = models.URLField(blank = True)
    content = models.TextField(blank = False)
    
    def __unicode__(self):
        return "%s - %s %s: %s" % (self.id, self.author, self.email, self.photo.title)